perm filename MRIKDF.TEX[TEX,DEK] blob
sn#500240 filedate 1980-03-27 generic text, type C, neo UTF8
COMMENT ā VALID 00002 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 \input mripkg
C00011 ENDMK
Cā;
\input mripkg
\setcount0 -7 %starting page numbers for key section
% = last page of author section (or page+1);
% negative value gives roman page numerals
\setcount9 460 %"equalized" column length of last page of
% author section = amount by which beginning of
% key section is to be dropped
\setcount2 635 %length of single column on full page
\setcount3 75 %length of header info
\setcount1 \count2
\advcount1 by -\count3 %reduce length of first page by header length
\advcount1 by -\count9 %reduce length of first page data by height of
% data column on last author page
\setcount4 20 %height (total) of running heads line
\setcount5 \count2 \advcount5 by \count4 %total page height
\setcount6 154 %column measure
\xdef\colwd{\count6pt} %column measure
\setcount7 8 %intercolumn spacing
% column measure plus intercolumn spacing should be a multiple of leader size
\setcount8 \count6 \advcount8 by \count7 \advcount8 by \count6
\xdef\colcolwd{\count8pt} %size of two columns
\advcount8 by \count7 \advcount8 by \count6
\xdef\pagewd{\count8pt} %full page width; sum of column widths plus space
% initialize single-column dimensions
\hsize \colwd \vsize \count1 pt \maxdepth 2pt \topbaseline 0pt
\sixpt \baselineskip 7.5pt \lineskip 0pt
\def\sevenstrut{\lower 2.25pt\vbox to 7.5pt{}} % to fit adjacent boxes
\def\parlead{\vskip 0pt plus .1pt}
\def\negparlead{\hbox{\sevenstrut}\vskip -7.5pt plus -.1pt}
\gdef\fpage{T} %fpage = T indicates first page
\gdef\colonflag{T} %colonflag = T indicates that last entry set
% was not a key descriptor
\gdef\newcolumn{F} %newcolumn = T indicates that "cont'd" will be
% needed in current column
\gdef\lr{L} %lr = L means the next output will be left 2/3
% note - references (mr numbers, cmp, or author cross-references) must
% be enclosed within the same {...} group as the key text (\key
% or \colonsub) to which they refer
\def\flushcontd{\if T\newcolumn{\topinsert{\box0}\gdef\newcolumn{F}}\else{}}
\def\key#1{ %regular key text
\flushcontd
\if T\colonflag{\mark{F{}}\gdef\colonflag{F}}\else{}
\penalty -100 %break is permissible before any regular key
\parlead
\hbox par \colwd{\sevenstrut\hangindent 1.5em#1\sevenstrut\npg}}
\def\colonkey#1{ %text of key preceding colon (descriptor)
\flushcontd
\if T\colonflag{\mark{F{}}}\else{\gdef\colonflag{F}}
\penalty -200 %break is very permissible before any colon key
\parlead
\gdef\colonflag{T} %last key set IS a colon key
\mark{T{\save0\hbox par \colwd{\sevenstrut#1
({\sl cont'd.})\sevenstrut}}}
\hbox par \colwd{\sevenstrut\hangindent 1.5em#1\sevenstrut}
\gdef\firstsub{T}
\penalty 1000} %do NOT break between descriptor and subdescriptor
\def\colonsub#1{ %text of key following colon (subdescriptor)
\flushcontd
\parlead
\hbox par \colwd {\sevenstrut\!
\hangindent 3em\hskip 1.5em#1\sevenstrut\npg}
\if T\firstsub{\gdef\firstsub{F}\penalty999}\else{}}
% discourage break at bottom of page if
% fewer than 2 entries have followed new colon key
\output{\outa}
% the following tricky code looks at \botmark, which is either "F{}"
% or "T{\save0\hbox par \colwd{...}}"
\def\markit{\trace'357\xdef\contdkey{\botmark}
\gdef\newcolumn{T}\if T\contdkey\else{\gdef\newcolumn{F}}}
\def\outa{\output{\outb}\markit\par\save1\page}
\def\outb{\output{\outc}
\markit\par %now we print the left 2/3 page
\vbox to \count5 pt{\baselineskip0pt\lineskip0pt
% this full-page length includes running head
\vbox to \count4 pt {\vfill %begin running head
\eightpt\bf\hbox{\!
\spose{\hbox to \pagewd{\hfill KEY INDEX\hfill}}
\ifeven0{}\else{\count0}}% left edge of running head
\vskip 12pt}
\if T\fpage{\vbox to \count9 pt{\sixpt
\hbox to \colcolwd{top line of authors\hfill
top line of authors}
\vfill\hbox to \pagewd {\:q\hfill
(strip author section here)\hfill}
\vfill\hbox to \colcolwd {bottom line of authors\!
\hfill bottom line of authors}}
\vbox to \count3 pt{\vfill
\hbox to \pagewd {\:>\hfill KEY INDEX\hfill}
\vskip 35pt}}
\else{}
\hbox to \colcolwd {\box1\hfill\page}}
\gdef\lr{R}}
\def\outc{\output{\outa}\markit\par %now we print the right 1/3 page
\moveright \colwd\vbox to \count5 pt{\baselineskip0pt\lineskip0pt
\vbox to \count4 pt {\vfill %begin running head
\eightpt\bf\hbox to \colwd{\hss
\hbox to \pagewd{\spose{\hbox to \pagewd{\hfill
KEY INDEX\hfill}}\hfill
\ifeven0{\count0}\else{}}} % right edge of running head
\vskip 12pt}
\if T\fpage{\vbox to \count9 pt{\sixpt
\hbox to \colwd{\hfill top line of authors}
\vfill\hbox to \colwd {\hfill bottom line of authors}}
\vbox to \count3 pt{\vfill
\hbox to \colwd{\hss
\hbox to \pagewd {\:>\hfill KEY INDEX\hfill}}
\vskip 35pt}
\vsize \count2 pt \gdef\fpage{F}}
\else{}
\page
\advcount0} %increment page number
\gdef\lr{L}}
\def\closeout{\vfill\penalty-1000
\def\n{\hbox to \colwd{}}
\if\lr L{\n\eject\if\lr L{\n\eject}\else{}}\else{}
\n\end} % gets the last page out
\negparlead % this is necessary to cancel \parlead at beginning of first column
% (since the first thing on that page is a \mark)